package jvm;

import java.util.ArrayList;
import java.util.List;

public class MyThreadLocal {

    private static ThreadLocal<List<Integer>> threadLocal=new ThreadLocal<>();

    public static void main(String[] args) {

        threadLocal.set(new ArrayList<>());
        System.gc();
        List<Integer> list = threadLocal.get();
        System.out.println(list);
        System.gc();
        System.out.println(list);
    }

}
